package edu.sctu.practice.class01.nieyu.assign03.assign03_2;

/**
 * Created by Administrator on 2015/10/22.
 */
public class Circle {

    protected double radius;

    public Circle()
    {

        radius=1.0;
    }

    public Circle(double r)
    {

        radius=r;
    }

    public double getRadius()
    {

        return radius;
    }
    public void setRadius(double radius)
    {

        this.radius = radius;
    }

    public double findArea()
    {

        return radius*radius*Math.PI;
    }
    public boolean equals(Circle circle)
    {

        return this.radius == circle.getRadius();
    }

    public String toString()
    {

        return " 圆半径为： " + radius;
    }

}
